<template>
  <div>
    <el-breadcrumb separator="/">
      <el-breadcrumb-item>车辆管理</el-breadcrumb-item>
      <el-breadcrumb-item :to="{ path: '/index/cars/carslist' }">车辆列表</el-breadcrumb-item>
    </el-breadcrumb>

    <!-- <el-row class="margintop20">
      <el-col v-if="goodList">
        <el-tabs tab-position="left" style="height:100%" :value="active" @tab-click="tabclick">
          <el-tab-pane v-for="(item,i) in goodTypes" :key="i" :name="i+''" :label="item.text">
            <Items :typeobj="item" :goods="goodList"></Items>
          </el-tab-pane>
        </el-tabs>
      </el-col>
    </el-row> -->
    <Items v-if="carList" :cars="carList" />
  </div>
</template>


<script>
import { getallcarinfo,getcarstype } from "@/api";
import Items from "./items.vue"
export default {
    components:{
        Items
    },
  data() {
    return {
      carList: null,
      active: 1,
    };
  },
  methods: {
    tabclick() {},
    getcarlist() {
      getallcarinfo()
        .then((res) => {
          if (res.type) {
            // console.log(11111);
            this.carList = res.result
          }
        })
        .catch((err) => {});
    },
    getCarsType(){
        getcarstype()
        .then((res) => {
          if (res.type) {
            console.log(2);
          }
        })
        .catch((err) => {});
    }

  },
  mounted() {
    this.$nextTick(()=>{
      this.getcarlist()
    })
      
  },
};
</script>



